﻿@model CurrencySelectorModel
@using Nop.Web.Models.Common;
@if (Model.AvailableCurrencies.Count > 1)
{
    var currencies = Model.AvailableCurrencies.Select(x => new SelectListItem
    {
        Text = x.Name,
        Value = @Url.RouteUrl("ChangeCurrency", new { customercurrency = x.Id }),
        Selected = x.Id.Equals(Model.CurrentCurrency.Id)
    });
    
    @Html.DropDownList("customerCurrency", currencies, new { onchange = "setLocation(this.value);" })
}